<?php
include 'includes/html.inc';






$folder = $_GET['folder'];


$show = TRUE;
if(!isset($folder))
    {
        $folder = 'Folder não Especificado';
        $show = FALSE;
    
    }
else{
        //retornar os dados da Pasta 
        $link_id = db_connect($default_dbname);
        if(!$link_id) error_message (sql_error ());
        $UID = md5($folder);
        $query = "select AlbumID,nome,descricao,publicado,UID,dtcadastro from TBAlbum where UID='$UID'";
        $result = mysql_query($query);
        if(!$result) error_message (sql_error());
        $query_data = mysql_fetch_array($result);
        $AlbumID = $query_data["AlbumID"];
        $nome = $query_data["nome"];
        $descricao = $query_data["descricao"];
        $publicado = $query_data["publicado"];
        
        if (trim($query_data["UID"]) =="")
            {
                $action  = 'new';
                $str_status = 'Não Cadastrado';
                $dataCadastro = 'Não Disponível';
            }
        else 
            {
                $dataCadastro = $query_data["dtcadastro"];
                $action ='update';
                if($publicado == 0)
                    {
                        $str_status = 'Não Publicado';
                    }
                    else
                        {
                        $str_status = 'Publicado';
                        }
            }
        
    
    
    }
 
    
    
    
    
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<?php
    html_header()
?>
    
<body>
<div id="wrapper">
	<div id="header" class="container">
		<div id="logo">
			<?php html_logo() ?>
		</div>
		<div id="menu">
			<?php html_menu() ?>
		</div>
	</div>
	<!-- end #header -->
	<div id="page" class="container">
		<div id="content">
			<div class="post">
				<?php list_thumb($folder) ?>
                                
			</div>
			<?php html_formularioCadastro() ?>
						<div style="clear: both;">&nbsp;</div>
		</div>
		<!-- end #content -->
		<div id="sidebar">
			<ul>
				
				<li>
					<h2>Folders</h2>
					<?php lista_diretorio() ?>
				</li>
				
			</ul>
		</div>
		<!-- end #sidebar -->
		<div style="clear: both;">&nbsp;</div>
	</div>
	<!-- end #page -->
</div>
<div id="footer-content" class="container">
	<div id="footer-bg">
		<div id="column1">
			<h2>Welcome to my website</h2>
			<p>In posuere eleifend odio quisque semper augue mattis wisi maecenas ligula. Donec leo, vivamus fermentum nibh in augue praesent a lacus at urna congue rutrum. Quisque dictum integer nisl risus, sagittis convallis, rutrum id, congue, and nibh.</p>
		</div>
		<div id="column2">
			<h2>Etiam rhoncus volutpat</h2>
			<p>Sed lacus. Donec lectus. Nullam pretium nibh ut turpis. Nam bibendum. In nulla tortor, elementum vel, tempor at, varius non, purus. Mauris vitae nisl nec metus consectetuer. Donec ipsum. Proin imperdiet est. Phasellus dapibus semper urna.</p>
		</div>
		<div id="column3">
			<h2>Recommended Links</h2>
			<ul>
				<li><a href="#">Consectetuer adipiscing elit</a></li>
				<li><a href="#">Metus aliquam pellentesque</a></li>
				<li><a href="#">Suspendisse iaculis mauris</a></li>
				<li><a href="#">Urnanet non molestie semper</a></li>
				<li><a href="#">Proin gravida orci porttitor</a></li>
			</ul>
		</div>
	</div>
</div>
<div id="footer">
	<p>Copyright (c) 2011 Sitename.com. All rights reserved. Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
</div>
<!-- end #footer -->
</body>
</html>

